<template>
    <div style="background-color:#ffffff;" >
        <div>
             <!-- <router-link to="/Notice/ViewList">
                <el-button type="info"  @click="$router.go(-1)" icon="el-icon-arrow-left" size="mini">返回</el-button>
            </router-link> -->
            &nbsp;
            <el-button type="primary" icon="el-icon-printer" size="mini">打印</el-button>
        </div>
        <hr style="border:1px solid #F0F0F0"/>
           <h4>{{ViewFrom.Title}}</h4>
           <br>
           <div style="height:35px;">
              <div style="float:left">
                   发布：{{ViewFrom.DepartmentName}}
              </div>
              <div style="float:right" >
                   {{ViewFrom.CreateDate|TimeFilter}}
              </div>
           </div>
           <div style="border-top:1px solid #F0F0F0;padding-top:10px;">
                <span>{{ViewFrom.Description}}</span>
           </div>
           <br>
        <div style="border-top:1px solid #F0F0F0;padding-top:10px;">
            <router-link to="/Notice/ViewList">
                <el-button type="info" icon="el-icon-arrow-left" size="mini">返回</el-button>
            </router-link>
        </div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            ViewFrom:{}
        }
    },
    methods:{
         Edit(id){
          this.$router.push({
          path: "/Notice/Edit",
          query: {
          pk_Name: id
        }
         })
         }
    },
    mounted(){
        //alert(this.$route.query["pk_Notice"])
        this.$axios({
            url: "/HrApi/NoticeList/GetNoticeDesc",
            method: "GET",
            params:{
               pk_Notice: this.$route.query['pk_Notice']
            }
        }).then(res=>{
            if(!res.data.code){
                this.ViewFrom=res.data.data
            }
        })
    },
    filters:{
        TimeFilter(t){
            if(t == null){
                return '芜湖,起飞'
            }
            let dt = t.split('T').join('')
            if(dt.split('.'.length>1)){
                dt = dt.split('.')[0]
            }
            return dt
        }
    }
}
</script>